﻿package Public;

import protocol.LogInfoParams;



public class DataPresentation
{
	/** 
	 用户数据
	 
	*/
	public static void UserInfo(java.util.HashMap<Short, String> logInfoDic)
	{
		String PHONEID = " "; //设备ID
		String ACCID = " "; //帐号ID
		String ACCNAME = " "; //帐号名称
		String BALANCE = " "; //当前余额(血石余额)
		String ROLEID = " "; //角色id
		String ROLENAME = " "; //角色名
		String LEVEL = " "; //级别
		String MONEY = " "; //金币
		String CRAETETIME = " "; //创建时间
		String LASTTIME = " "; //最后活动时间
		String CHANNEL = " "; //渠道号

		PHONEID = logInfoDic.get(LogInfoParams.PHONEID);
		ACCID = logInfoDic.get(LogInfoParams.ACCID);
		ACCNAME = logInfoDic.get(LogInfoParams.ACCNAME);
		BALANCE = logInfoDic.get(LogInfoParams.BALANCE);
		ROLEID = logInfoDic.get(LogInfoParams.ROLEID);
		ROLENAME = logInfoDic.get(LogInfoParams.ROLENAME);
		LEVEL = logInfoDic.get(LogInfoParams.LEVEL);
		MONEY = logInfoDic.get(LogInfoParams.MONEY);
		CRAETETIME = logInfoDic.get(LogInfoParams.CRAETETIME);
		LASTTIME = logInfoDic.get(LogInfoParams.LASTTIME);
		CHANNEL = logInfoDic.get(LogInfoParams.CHANNELID);

//		String logResult = String.format("%1$s$$%2$s$$%3$s$$%4$s$$%5$s$$%6$s$$%7$s$$%8$s$$%9$s$$%10$s$$%11$s", PHONEID, ACCID, ACCNAME, BALANCE, ROLEID, ROLENAME, LEVEL, MONEY, CRAETETIME, LASTTIME, CHANNEL);
		//TODO:YuanServerApplication.userInfo.Info(logResult);
	}
	/** 
	 充值数据
	 
	*/
	public static void ChargeInfo(java.util.HashMap<Short, String> logInfoDic)
	{
		String PHONEID = " "; //设备ID
		String ACCID = " "; //帐号ID
		String ACCNAME = " "; //帐号名称
		String CHANNELID = " "; //渠道号
		String ROLEID = " "; //角色id
		String ROLENAME = " "; //角色名
		String LEVEL = " "; //级别
		String IMONEY = " "; //元宝数
		String RMB = " "; //充值人民币金额
		String TIME = " "; //充值时间

		PHONEID = logInfoDic.get(LogInfoParams.PHONEID);
		ACCID = logInfoDic.get(LogInfoParams.ACCID); //帐号ID
		ACCNAME = logInfoDic.get(LogInfoParams.ACCNAME); //帐号名称
		CHANNELID = logInfoDic.get(LogInfoParams.CHANNELID); //渠道号
		ROLEID = logInfoDic.get(LogInfoParams.ROLEID); //角色id
		ROLENAME = logInfoDic.get(LogInfoParams.ROLENAME); //角色名
		LEVEL = logInfoDic.get(LogInfoParams.LEVEL); //级别
		IMONEY = logInfoDic.get(LogInfoParams.IMONEY); //元宝数
		RMB = logInfoDic.get(LogInfoParams.RMB); //充值人民币金额
		TIME = logInfoDic.get(LogInfoParams.TIME); //充值时间

		String logResult = String.format("%1$s$$%2$s$$%3$s$$%4$s$$%5$s$$%6$s$$%7$s$$%8$s$$%9$s$$%10$s", PHONEID, ACCID, ACCNAME, CHANNELID, ROLEID, ROLENAME, LEVEL, IMONEY, RMB, TIME);
		//TODO:YuanServerApplication.chargeInfo.Info(logResult);
	}

	//Start========================================用户行为日志======================================================

	/** 
	 登录账号
	 
	*/
	public static void AccountLogin(java.util.HashMap<Short, String> logInfoDic)
	{

		String ACCID = " "; //帐号ID
		String PHONEID = " "; //设备ID
		String ACCNAME = " "; //帐号名称
		String BALANCE = " "; //当前余额(血石余额)
		String IP = " "; //登录IP

		ACCID = logInfoDic.get(LogInfoParams.ACCID);
		PHONEID = logInfoDic.get(LogInfoParams.PHONEID);
		ACCNAME = logInfoDic.get(LogInfoParams.ACCNAME);
		BALANCE = logInfoDic.get(LogInfoParams.BALANCE);
		IP = logInfoDic.get(LogInfoParams.IP);

		String logResult = String.format("$$ACCOUNT_LOGIN$$%1$s$$%2$s$$%3$s$$%4$s$$%5$s", ACCID, PHONEID, ACCNAME, BALANCE, IP);
		//TODO:YuanServerApplication.actionInfo.Info(logResult);
	}

	/** 
	 注册账号
	 
	*/
	public static void AccountRegister(java.util.HashMap<Short, String> logInfoDic)
	{
		String ACCID = " "; //帐号ID
		String PHONEID = " "; //设备ID
		String ACCNAME = " "; //帐号名称
		String GAMEVERSION = " "; //客户端版本号
		String PHONETYPE = " "; //客户端类型(Android或者iOS)
		String PHONENUMBER = " "; //检测到的客户端手机号

		ACCID = logInfoDic.get(LogInfoParams.ACCID);
		PHONEID = logInfoDic.get(LogInfoParams.PHONEID);
		ACCNAME = logInfoDic.get(LogInfoParams.ACCNAME);
		GAMEVERSION = logInfoDic.get(LogInfoParams.GAMEVERSION);
		PHONETYPE = logInfoDic.get(LogInfoParams.PHONETYPE);
		PHONENUMBER = logInfoDic.get(LogInfoParams.PHONENUMBER);

		String logResult = String.format("$$ACCOUNT_REGISTER$$%1$s$$%2$s$$%3$s$$%4$s$$%5$s$$%6$s", ACCID, PHONEID, ACCNAME, GAMEVERSION, PHONETYPE, PHONENUMBER);
		//TODO:YuanServerApplication.actionInfo.Info(logResult);
	}

	/** 
	 创建角色
	 
	*/
	public static void CreateRole(java.util.HashMap<Short, String> logInfoDic)
	{
		String ROLEID = " "; //角色id
		String ROLENAME = " "; //角色名
		String ROLEGENDER = " "; //角色性别

		ROLEID = logInfoDic.get(LogInfoParams.ROLEID);
		ROLENAME = logInfoDic.get(LogInfoParams.ROLENAME);
		ROLEGENDER = logInfoDic.get(LogInfoParams.ROLEGENDER);

		String logResult = String.format("$$CREATE_ROLE$$%1$s$$%2$s$$%3$s", ROLEID, ROLENAME, ROLEGENDER);
		//TODO:YuanServerApplication.actionInfo.Info(logResult);
	}

	/** 
	 角色登录
	 
	*/
	public static void RoleLogin(java.util.HashMap<Short, String> logInfoDic)
	{
		String ROLEID = " "; //角色id
		String ACCID = " "; //帐号ID
		String ACCNAME = " "; //帐号名称
		String BALANCE = " "; //当前余额(血石余额)
		String PHONEID = " "; //设备ID
		String ROLENAME = " "; //角色名
		String ROLEINFO = " "; //角色信息
		String IP = " "; //登录IP

		ROLEID = logInfoDic.get(LogInfoParams.ROLEID);
		ACCID = logInfoDic.get(LogInfoParams.ACCID);
		ACCNAME = logInfoDic.get(LogInfoParams.ACCNAME);
		BALANCE = logInfoDic.get(LogInfoParams.BALANCE);
		PHONEID = logInfoDic.get(LogInfoParams.PHONEID);
		ROLENAME = logInfoDic.get(LogInfoParams.ROLENAME);
		ROLEINFO = logInfoDic.get(LogInfoParams.ROLEINFO);
		IP = logInfoDic.get(LogInfoParams.IP);

		String logResult = String.format("$$ROLE_LOGIN$$%1$s$$%2$s$$%3$s$$%4$s$$%5$s$$%6$s$$%7$s$$%8$s", ROLEID, ACCID, ACCNAME, BALANCE, PHONEID, ROLENAME, ROLEINFO, IP);
		//TODO:YuanServerApplication.actionInfo.Info(logResult);
	}

	//End==========================================用户行为日志======================================================
}